var express = require('express');
var router = express.Router();

/* GET users listing. */
router.get('/', function(req, res, next) {
	res.send('respond with a resource');
});
/*get */
router.get('/getTest1/:id', function(req, res, next) {
	var json = {
		code: 200,
		msg: req.params.id
	}
	res.send(json);
});
/*get */
router.get('/getTest2', function(req, res, next) {
	var json = {
		code: 200,
		msg: req.query.id
	}
	res.send(json);
});
/*post */
router.post('/postTest', function(req, res, next) {
	var json = {
		code: 200,
		msg: req.body
	}
	res.send(json);
});

module.exports = router;